import React from "react";
export default class SwiperCom extends React.Component {
    constructor() {
        super()
        this.state = {
            bannerList: []
        }
    }
    swiperInit() {
        new Swiper(".swiper", {
            // direction:"vertical", // 垂直切换选项
            loop: true,  // 循环模式选项
            autoplay: true,
            autoplay: {
                pauseOnMouseEnter: true,
                disableOnInteraction: false,
                delay: 1000 // 1秒切换一次
            },
            // 如果需要分页器
            pagination: {
                el: ".swiper-pagination",
            },
            // 如果需要前进后退按钮
            navigation: {
                nextEl: ".swiper-button-next",
                prevEl: ".swiper-button-prev"
            }
        })
    }
}